import { createI18n } from 'vue-i18n'

const messages = {
  zh: {
    nav: {
      home: '首页',
      about: '关于我',
      portfolio: '作品集',
      blog: '博客',
      contact: '联系我'
    },
    home: {
      hero: {
        tagline: 'Java开发工程师 · 后端架构师 · 技术分享者',
        heading: '嗨，我是程序员柯基\n',
        description: '6年Java开发经验，专注于构建高性能、可扩展的企业级应用，帮助企业解决技术难题。',
        viewPortfolio: '查看作品集',
        contactMe: '联系我',
        scrollDown: '向下滚动'
      },
      expertise: {
        subtitle: '我的专长',
        title: '核心技术能力',
        backend: {
          title: '后端架构',
          desc: '设计高性能、可扩展的企业级应用架构，包括微服务设计、API规范和系统集成。'
        },
        database: {
          title: '数据库优化',
          desc: '精通数据库设计与性能调优，能够处理大规模数据架构和复杂查询优化。'
        },
        distributed: {
          title: '分布式系统',
          desc: '构建高可用、容错的分布式系统，解决数据一致性、负载均衡和水平扩展问题。'
        },
        performance: {
          title: '性能优化',
          desc: '系统性能瓶颈分析与优化，包括JVM调优、并发处理和资源利用效率提升。'
        }
      },
      projects: {
        subtitle: '个人精选项目',
        title: '代表作品',
        viewAll: '查看全部项目',
        learnMore: '了解更多'
      },
      contact: {
        subtitle: '让我们合作',
        title: '准备好开始您的项目了吗？',
        description: '我随时准备好为您的下一个项目提供专业的技术支持和解决方案。无论是企业应用开发、系统架构设计，还是性能优化，请随时与我联系。',
        contactMe: '联系我',
        downloadResume: '下载简历'
      }
    },
    about: {
      title: '关于我',
      tabs: {
        intro: '个人介绍',
        skills: '技能专长',
        experience: '工作经历'
      },
      intro: {
        title: '关于我',
        p1: '你好！我是程序员柯基，一位拥有6年经验的Java开发工程师。我热衷于设计和实现高性能、可扩展的后端系统，同时也对全栈开发有深入研究。',
        p2: '在我的职业生涯中，我参与了多个大型企业应用的开发与架构设计，积累了丰富的微服务、分布式系统和高并发处理经验。我相信清晰的架构设计和高质量的代码是构建优秀软件产品的基础。'
      },
      skills: {
        title: '技能专长'
      },
      experience: {
        title: '工作经历'
      },
      stats: {
        years: '年工作经验',
        projects: '完成项目',
        clients: '个人用户',
        sharing: '技术分享'
      },
      downloadCV: '下载完整简历（PDF）'
    },
    contact: {
      title: '联系方式',
      info: {
        title: '联系信息',
        desc: '如果您有任何问题或合作意向，请随时通过以下方式联系我：'
      },
      form: {
        title: '发送消息',
        name: '姓名',
        namePlaceholder: '请输入您的姓名',
        email: '邮箱',
        emailPlaceholder: '请输入您的邮箱',
        subject: '主题',
        subjectPlaceholder: '请输入消息主题',
        message: '留言内容',
        messagePlaceholder: '请输入您的留言内容',
        send: '发送消息'
      },
      social: {
        title: '社交媒体',
        desc: '你也可以通过以下社交媒体平台关注我：'
      }
    },
    footer: {
      about: '程序员柯基的个人空间',
      aboutDesc: '专注Java后端开发与系统架构设计，致力于分享实用的编程技巧和最佳实践。',
      quickLinks: '快速链接',
      contact: '联系方式',
      subscribe: {
        title: '订阅更新',
        desc: '订阅我的最新动态，不错过任何更新和文章。',
        placeholder: '您的邮箱地址'
      },
      copyright: '©2025 程序员柯基的个人网站 | 设计与开发：程序员柯基'
    }
  },
  en: {
    nav: {
      home: 'Home',
      about: 'About',
      portfolio: 'Portfolio',
      blog: 'Blog',
      contact: 'Contact'
    },
    home: {
      hero: {
        tagline: 'Java Developer · Backend Architect · Tech Sharer',
        heading: 'Hi, I\'m Programmer Corgi\n',
        description: 'With 6 years of Java development experience, I focus on building high-performance, scalable enterprise applications, helping businesses solve technical challenges.',
        viewPortfolio: 'View Portfolio',
        contactMe: 'Contact Me',
        scrollDown: 'Scroll Down'
      },
      expertise: {
        subtitle: 'My Expertise',
        title: 'Core Technical Skills',
        backend: {
          title: 'Backend Architecture',
          desc: 'Design high-performance, scalable enterprise application architectures, including microservice design, API specifications, and system integration.'
        },
        database: {
          title: 'Database Optimization',
          desc: 'Proficient in database design and performance tuning, capable of handling large-scale data architectures and complex query optimization.'
        },
        distributed: {
          title: 'Distributed Systems',
          desc: 'Build highly available, fault-tolerant distributed systems, solving data consistency, load balancing, and horizontal scaling issues.'
        },
        performance: {
          title: 'Performance Optimization',
          desc: 'System performance bottleneck analysis and optimization, including JVM tuning, concurrent processing, and resource utilization efficiency improvement.'
        }
      },
      projects: {
        subtitle: 'Featured Projects',
        title: 'Representative Works',
        viewAll: 'View All Projects',
        learnMore: 'Learn More'
      },
      contact: {
        subtitle: 'Let\'s Collaborate',
        title: 'Ready to Start Your Project?',
        description: 'I\'m always ready to provide professional technical support and solutions for your next project. Whether it\'s enterprise application development, system architecture design, or performance optimization, feel free to contact me.',
        contactMe: 'Contact Me',
        downloadResume: 'Download Resume'
      }
    },
    about: {
      title: 'About Me',
      tabs: {
        intro: 'Introduction',
        skills: 'Skills',
        experience: 'Experience'
      },
      intro: {
        title: 'About Me',
        p1: 'Hello! I\'m Programmer Corgi, a Java developer with 6 years of experience. I\'m passionate about designing and implementing high-performance, scalable backend systems, while also having in-depth knowledge of full-stack development.',
        p2: 'Throughout my career, I\'ve participated in the development and architectural design of multiple large enterprise applications, accumulating rich experience in microservices, distributed systems, and high-concurrency processing. I believe that clear architectural design and high-quality code are the foundation for building excellent software products.'
      },
      skills: {
        title: 'Technical Skills'
      },
      experience: {
        title: 'Work Experience'
      },
      stats: {
        years: 'Years of Experience',
        projects: 'Completed Projects',
        clients: 'Enterprise Clients',
        sharing: 'Tech Sharing'
      },
      downloadCV: 'Download Complete Resume (PDF)'
    },
    contact: {
      title: 'Contact Information',
      info: {
        title: 'Contact Info',
        desc: 'If you have any questions or cooperation intentions, please feel free to contact me through the following methods:'
      },
      form: {
        title: 'Send Message',
        name: 'Name',
        namePlaceholder: 'Please enter your name',
        email: 'Email',
        emailPlaceholder: 'Please enter your email',
        subject: 'Subject',
        subjectPlaceholder: 'Please enter message subject',
        message: 'Message',
        messagePlaceholder: 'Please enter your message',
        send: 'Send Message'
      },
      social: {
        title: 'Social Media',
        desc: 'You can also follow me on the following social media platforms:'
      }
    },
    footer: {
      about: 'Programmer Corgi\'s Personal Space',
      aboutDesc: 'Focused on Java backend development and system architecture design, committed to sharing practical programming tips and best practices.',
      quickLinks: 'Quick Links',
      contact: 'Contact',
      subscribe: {
        title: 'Subscribe',
        desc: 'Subscribe to my latest updates, don\'t miss any updates and articles.',
        placeholder: 'Your email address'
      },
      copyright: '©2025 Programmer Corgi\'s Personal Website | Design & Development: Programmer Corgi'
    }
  }
}

const i18n = createI18n({
  legacy: false, // 使用组合式API
  locale: localStorage.getItem('lang') || 'zh', // 默认语言
  fallbackLocale: 'zh', // 备用语言
  messages
})

export default i18n 